package com.jsp.web; /**
 * @author wzm
 * @create 2023-05-06 11:38
 */

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/jstl01")
public class JSTLServlet01 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //这里模拟了很多的步骤

        //1.将数据存储到域对象中
        request.setAttribute("age",25);
        //2.转发到JSTL03.jsp中
        request.getRequestDispatcher("/JSTL01.jsp")
                .forward(request,response);

    }
}
